<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script>
			var rightpwd="123456";
			var inputpwd=prompt("请您输入密码");
			var times=0;
			while(rightpwd!=inputpwd){
				alert("密码错误");
			}if(times=3){
					alert("登录失败");
				}
			alert("登录成功");
		</script>
	</body>
</html>
